Game xếp hình 2048

13.204 lượt xem;
1 using UnityEngine;
2 using
System.Collections;
3
4 public
class MoveControlScript : MonoBehaviour {
5
6     
public int direction;
7     
public string axis;
8     
public GameObject gameController;
9
10
11
12     
// Use this for initialization
13     
void Start () {
14         transform.GetComponent<Renderer>().material.color = Color.red;
15     }
16     
17     
// Update is called once per frame
18     
void Update () {
19     
20     }
21
22     
void OnMouseUpAsButton() {
23         GameControllerScript gameControllerScript =
this.gameController.GetComponent<GameControllerScript> ();
24         gameControllerScript.doMove (
this.axis, this.direction);
25     }
26 }


Use this for initialization

Update is called once per frame



Gõ tìm kiếm nhanh...